<!--<td><input type="checkbox" name="id[]" value="{$vo.id}"></td>-->
{if empty($dre)}
<td>{$vo.id}</td>
{else}
<td>{$vo.dispatch_id}</td>
{/if}
{if empty($dre)}
<td>{php}echo Db::name('route')->where('id',$vo['route_id'])->value('title'){/php}</td>
{else}
<td>{$vo.title}</td>
{/if}
{if empty($dre)}
<td>
    {php}
        $realname = Db::name('admin_user')->where('id',$vo['driver_user_id'])->value('realname');
        // echo $realname;
    {/php}
    <a title="详细资料" href="javascript:;" onclick="driverInfo({$vo.driver_user_id})" style="text-decoration:none">
        {$realname}
    </a>
</td>
<td>
    {php}
        $dr_rank_name = Db::name('driver_rank')->where('id',$vo['driver_rank_id'])->value('name');
        echo $dr_rank_name?:'新手';
    {/php}
</td>
{else}
<td>{$vo.realname}</td>
<td>{$vo.dr_rank_name?:'新手'}</td>
{/if}
<td>{$vo.vehicle_level?:'未评级'}</td>
<td>{$vo.car_form}</td>
{if empty($dre)}
<td width="200">{php}
    if(!$vo['is_pickup']){
        $namt = null;
        $guest_name = null;
        $name = null;
        $namt = Db::name('order_traveler')->where('group_id',$vo['id'])->field('name')->select();
            foreach($namt as $k => $v) {
                $guest_name[] = $v['name'];
            }
            if(!empty($guest_name)) {
                $name = implode("+", $guest_name);
                $name = rtrim($name,'+');
            } else {
                $name = null;
            }
        echo $name;
    }else{
            $namt = null;
            $guest_name = null;
            $name = null;
            $namt = Db::name('order_traveler')->where('oid',$vo['dtg_oid'])->field('name')->select();
            foreach($namt as $k => $v) {
             $guest_name[] = $v['name'];
            }
            if(!empty($guest_name)) {
            $name = implode("+", $guest_name);
            $name = rtrim($name,'+');
            } else {
            $name  = null;
            }
    echo $name;
    }
    {/php}</td>
<td>
    {$vo.num}
</td>
{if $show == 4}
<td width="">{$vo.comment_praise}</td>
<td width="">{$vo.comment_negative}</td>
{/if}
{else}
<td>{$vo.guest_name}</td>
<td>{$vo.guest_num}</td>
{/if}
{if $vo['is_pickup'] == 1}
{php}
    $start_time = Db::name('order')->where('id',$vo['dtg_oid'])->value('pick_up_time');
{/php}
<td>{$start_time?$start_time:"--"}</td>
<td>{$start_time?$start_time:"--"}</td>
{else/}
<td>{$vo.start_time?date('Y-m-d',$vo.start_time):"--"}</td>
<td>{$vo.end_time?date('Y-m-d',$vo.end_time):"--"}</td>
{/if}

<td width="200">{$vo.remark}</td>
{if !empty($dre)}
<td>{$vo.rejection_reason}</td>
<td>{$vo.dir_price}</td>
<td>{$vo.create_time?date('Y-m-d H:i:s',$vo.end_time):"--"}</td>
{/if}
<script>
    // 显示修改备注
    function edit_remark(e) {
        // var text = $('#text_remark' + e).text();
        $('#text_remark' + e).css('display', 'none');
        $('#edit_remark' + e).css('display', 'none');
        // $('#input_remark' + e).val(text);
        $('#input_remark' + e).css('display', 'block');
        $('#save_remark' + e).css('display', 'inline-block');
        $('#cancel_remark' + e).css('display', 'inline-block');
    }
    // 添加备注
    function save_remark(e, dtg_id) {
        var remark = $('#input_remark' + e).val();
        $.ajax({
            type: 'POST',
            url: "/admin/dispatch_traveler_group/add_dispatch_remark?dtg_id=" + dtg_id + "&remark=" + remark,
            data: null,
            success: function (re) {
                if (re.msg) {
                    layer.msg(re.msg, {
                        time: 1000, //1s后自动关闭
                    }, function () {
                        //关闭后刷新
                        location.reload();
                    });
                }
            }
        });
    }
    // 取消备注
    function cancel_remark(e) {
        $('#text_remark' + e).css('display', 'inline');
        $('#edit_remark' + e).css('display', 'inline');
        $('#input_remark' + e).css('display', 'none');
        $('#save_remark' + e).css('display', 'none');
        $('#cancel_remark' + e).css('display', 'none');
    }
</script>
